<?php
$db=new PDO('mysql:host=localhost;dbname=db','root','12qwas');
$r=$db->exec('create database if not exists db3');
var_dump($r);
$r = $db->exec('use db3');
var_dump($r);
$r=$db->exec('create table if not exists students(xh varchar(9) primary key, name varchar(50), age int default 0 )');
$r=$db->exec("delete from students where xh='233110221'");
var_dump($r);
$db->exec('truncate table students');
$r=$db->exec("insert into students(xh,name,age) values('233110221','饶铭轩',18),('233110222','饶铭轩',18),('233110223','饶铭轩',18)");
var_dump($r);
$r=$db->exec("update students set name='饶大帅币' where xh='233110221'");
var_dump($r);